Release 10.1A: OpenEdge Data Management:
Database Administration


Creating a database with the PRODB utility

If the target database does not have a .st file, the PRODB utility creates a new database from a specified source database. PRODB creates a new database using the structure of the source database and places all of the extents in the current working directory. You can use PRODB to make a copy of any of the demonstration or empty OpenEdge databases.

Note: When using PRODB to create a copy of a database, all the files of the database copy will reside in the same directory, unless a .st file already exists for the target database.

See the "PRODB utility" section for more information about PRODB.

Examples

The following examples illustrate how to create databases with PRODB.

To create an empty database called mysample from a copy of the default empty database, enter the following:

prodb mysample empty 

To create a new database called mysports2000 from a copy of the sports2000 database, enter the following:

prodb mysports2000 sports2000 

To create a new database called pastinfo from a copy of an existing database named currentinfo, enter the following:

prodb pastinfo currentinfo 

PRODB does not copy the external triggers associated with the database you are copying.

Note: See Chapter 14, "Maintaining Database Structure," for information about changing pathname conventions when adding storage areas and extents to a structure description file.

PRODB maintains pathname convention

When you use the PRODB utility, the target database you create maintains the same pathname convention, relative or absolute, as the source database. For example, if you use PRODB to create a database and name it example1, and use a relative path database such as sports2000 as the source database, PRODB maintains the pathname convention of sports2000 (the source database), and example1 (the target database) becomes a relative path database. Conversely, if the source database is an absolute path database, the target database you create with PRODB will also be an absolute path database. Use PROSTRCT LIST to verify whether the pathname is relative or absolute. For example:

prodb example1 sports2000  
prostrct list example1 

In the following sample output of the PROSTRCT LIST utility, note dot (.) notation of the relative pathname of the database, example1.db:

Area Name: Control Area, Type 6, BlockSize 4096, Extents 1, Records/Block32, 
Cluster Size 1 
   Ext # 1, Type VARIABLE, Size 32 KByte, Name: ./example1.db 
Area Name: Primary Recovery Area, Type 3, BlockSize 8192, Extents 1 
   Ext # 1, Type VARIABLE, Size 2176, Name: ./example1.b1 
Area Name: Schema Area, Type 6, BlockSize 4096, Extents 1, Records/Block 32, 
Cluster Size 1 
   Ext # 1, Type VARIABLE, Size 960 KByte, Name: ./example1.d1 
Area Name: Info, Type 6, BlockSize 4096, Extents 1, Records/Block 32, Cluster 
Size 1 
   Ext #1, Type VARIABLE, Size 192 KByte, Name: ./example1_7.d1 
Area Name: Order, Type 6, BlockSize 1024, Extents 1, Records/Block 32, Cluster 
Size 1 
   Ext # 1, Type FIXED   , Size 1280, Name: ./example1_8.d1 

See OpenEdge Getting Started: Database Essentials for an explanation of relative- and absolute-pathnames.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095